<br /><br />
<div id="view-content">
	<p>View <b>Blog/index</b></p>
</div>

Blog Entries: <br />
<dl>
	<?php foreach ($this->entries as $entry): ?>
	<dt><a href="<?php echo $this->url(array('controller' => 'user',
		'action' => 'index'), 'default', true) ?>"><?php echo $this->escape($entry->userId) ?></a></dt>
	<dd><?php echo $this->escape($entry->title) ?></dd>
	<dd><?php echo $this->escape($entry->posting) ?></dd>
	<hr />
	<?php endforeach ?>
</dl>

<hr />
<br /><br />
<div id="view-content">
	<p>View <b>user/show</b></p>
</div>

<h2>User</h2>
<table border="0">
	<?php foreach ($this->users as $entry): ?>
	<tr>
		<!-- td><?php echo $this->escape($entry->id) ?>-</td -->
		<td><b><?php echo $this->escape($entry->realName); ?></b></td>
		<td><?php echo $this->escape($entry->username);echo(' id:');echo $this->escape($entry->id);?></td>
		<td><a href="<?php echo $this->url(array('controller' => 'blog',
			'action' => 'edit',), 'default', true) ?>"><?php $this->echoIfLoggedin($entry->id, "(new)"); ?></a></td>

	</tr>
	<?php endforeach ?>
</table>
<h2>Blog entries: </h2>
<table border="0">
	<?php foreach ($this->blogs as $entry): ?>
	<tr><!-- td><?php //echo("blogid: $entry->id");?></td -->
		<!-- td> <?php echo $this->escape($entry->userId)?></td -->
		<td><a href="<?php echo $this->url(array('controller' => 'blog', 'action' => 'show',
			'id' => $entry->id,), 'default', true) ?>"><?php echo $this->escape($entry->title) ?></a></td>

		<td><a href="<?php $this->echoIfLoggedin($entry->userId, $this->url(array('controller' => 'blog', 'action' => 'edit',
			'id' => $entry->id,), 'default', true));?>"><?php $this->echoIfLoggedin($entry->userId, "(edit)"); ?></td>
		<td>
			<?php
			$form = new Application_Form_Blogdel();
			$form->setElementDecorators(array('ViewHelper'));

			$elements = $form->getElements();
			foreach ($elements as $el) {
				$el->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label');
			}

			$form->getElement('id')->setValue($entry->id);
			$form->setAction($this->url());
			$this->echoIfLoggedin($entry->userId, $form);
			?>
		</td>
	</tr>
	<?php endforeach ?>
</table>


